package com.edu.neusoft.cookbook.service.impl;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.edu.neusoft.cookbook.dto.RecipesDTO;
import com.edu.neusoft.cookbook.entity.Recipes;
import com.edu.neusoft.cookbook.mapper.RecipesMapper;
import com.edu.neusoft.cookbook.service.RecipesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 存储食谱信息的表(Recipes)表服务实现类
 *
 * @author makejava
 * @since 2024-12-07 11:35:11
 */
@Service
public class RecipesServiceImpl extends ServiceImpl<RecipesMapper, Recipes> implements RecipesService {

    @Autowired
    private RecipesMapper recipesMapper;

    @Override
    public List<RecipesDTO> findByPage(int pageNum, int pageSize) {
        List<RecipesDTO> productsList = recipesMapper.selectByPage(pageNum, pageSize);
        return productsList;
    }
}

